﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TopTenMovies.ascx.cs" Inherits="OnlineMovieTicket.WebForms.UserControl.TopTenMovies" %>
<p>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjDSTopTenMovieList" Height="69px" CssClass="trGrid">
        <HeaderStyle BackColor="#cc9900"/>
        <AlternatingRowStyle  BackColor="#767056"/>
        <EditRowStyle BackColor="#767056" />   
        <Columns>
             <asp:TemplateField>
                <ItemTemplate>
                        <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="MovieCode" HeaderText="MovieCode" 
                SortExpression="MovieCode" Visible="False" />
            <asp:TemplateField HeaderText="Top Ten Movies">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("MovieName") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    &nbsp;&nbsp;&nbsp;
                    <asp:Label ID="Label1" runat="server" ForeColor="White" 
                        Text='<%# Bind("MovieName") %>' Width="200px"></asp:Label>
                </ItemTemplate>
                <HeaderStyle Font-Bold="True" Height="30px" 
                    HorizontalAlign="Center" Width="200px" />
                <ItemStyle Height="25px" Width="200px" />
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            &nbsp;&nbsp;
        </EmptyDataTemplate>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjDSTopTenMovieList" runat="server" 
        SelectMethod="GetMovieByRating" 
        TypeName="OnlineMovieTicket.Services.Services.MoviesService">
    </asp:ObjectDataSource>
</p>

